<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <!--      <el-form-item label="厂房名称" prop="wshopName">
              <el-input
                v-model="queryParams.wshopName"
                placeholder="请输入厂房名称"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>-->
      <el-form-item label="产业集群" prop="parkIndustry">
        <el-select v-model="queryParams.parkIndustry" placeholder="请选择产业集群" clearable>
          <el-option
            v-for="dict in dict.type.industry_orientation"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="所属城市" prop="cityId">
        <el-select v-model="queryParams.provinceId" placeholder="请选择省份"
                   @change="getCityList(queryParams.provinceId)"
                   style="width: 108px"
                   clearable>
          <el-option
            v-for="dict in provinces"
            :key="dict.id"
            :label="dict.name"
            :value="dict.id"
          />
        </el-select>
        <el-select v-model="queryParams.cityId" placeholder="请选择城市"
                   :disabled="queryParams.provinceId==null||queryParams.provinceId===''"
                   style="width: 107px"
                   clearable>
          <el-option
            v-for="dict in citys"
            :key="dict.id"
            :label="dict.name"
            :value="dict.id"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="厂房名称" prop="wshopName">
        <el-input
          v-model="queryParams.wshopName"
          placeholder="请输入厂房名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="园区类型" prop="parkType">
        <el-select v-model="queryParams.parkType" placeholder="请选择园区类型" clearable>
          <el-option
            v-for="dict in dict.type.park_type"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="发布类型" prop="releaseType">
        <el-select v-model="queryParams.releaseType" placeholder="请选择发布类型" clearable>
          <el-option
            v-for="dict in dict.type.announce_type"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="服务类型" prop="supplyType">
        <el-select v-model="queryParams.supplyType" placeholder="请选择服务类型" clearable>
          <el-option
            v-for="dict in dict.type.supply_type"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="租赁价格" prop="wshopLeasePrice">
        <el-select v-model="queryParams.wshopLeasePrice" placeholder="请选择出售价格" clearable>
          <el-option
            v-for="dict in dict.type.rental_price"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="出售价格" prop="wshopSellPrice">
        <el-select v-model="queryParams.wshopSellPrice" placeholder="请选择出售价格" clearable>
          <el-option
            v-for="dict in dict.type.selling_price"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="应急系统" prop="wshopEmergency">
        <el-select v-model="queryParams.wshopEmergency" placeholder="请选择应急系统" clearable>
          <el-option
            v-for="dict in dict.type.sys_have_not"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="供暖" prop="wshopHeating">
        <el-select v-model="queryParams.wshopHeating" placeholder="请选择供暖" clearable>
          <el-option
            v-for="dict in dict.type.heating_system"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="制冷" prop="wshopRefrig">
        <el-select v-model="queryParams.wshopRefrig" placeholder="请选择制冷" clearable>
          <el-option
            v-for="dict in dict.type.refrigerating_system"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="燃气" prop="wshopGas">
        <el-select v-model="queryParams.wshopGas" placeholder="请选择燃气" clearable>
          <el-option
            v-for="dict in dict.type.gas_system"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="审核状态" prop="approvalState">
        <el-select v-model="queryParams.approvalState" placeholder="请选择审核状态" clearable>
          <el-option
            v-for="dict in dict.type.audit_status"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <!--      <el-form-item label="总面积" prop="wshopAllSize">
              <el-input
                v-model="queryParams.wshopAllSize"
                placeholder="请输入总面积"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="空置面积" prop="wshopFreeSize">
              <el-input
                v-model="queryParams.wshopFreeSize"
                placeholder="请输入空置面积"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="厂房层高" prop="wshopFloorHeight">
              <el-select v-model="queryParams.wshopFloorHeight" placeholder="请选择厂房层高" clearable>
                <el-option
                  v-for="dict in dict.type.floor_height"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="首层承重" prop="wshopFirstLoad">
              <el-input
                v-model="queryParams.wshopFirstLoad"
                placeholder="请输入首层承重"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="标准层承重" prop="wshopLoad">
              <el-input
                v-model="queryParams.wshopLoad"
                placeholder="请输入标准层承重"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="客梯" prop="wshopElevatorPeople">
              <el-input
                v-model="queryParams.wshopElevatorPeople"
                placeholder="请输入客梯"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="客梯负载" prop="wshopElevatorPeopleLoad">
              <el-input
                v-model="queryParams.wshopElevatorPeopleLoad"
                placeholder="请输入客梯负载"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="货梯" prop="wshopElevatorCargo">
              <el-input
                v-model="queryParams.wshopElevatorCargo"
                placeholder="请输入货梯"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="货梯负载" prop="wshopElevatorCargoLoad">
              <el-input
                v-model="queryParams.wshopElevatorCargoLoad"
                placeholder="请输入货梯负载"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="行吊设备" prop="wshopCrane">
              <el-input
                v-model="queryParams.wshopCrane"
                placeholder="请输入行吊设备"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="应急系统" prop="wshopEmergency">
              <el-select v-model="queryParams.wshopEmergency" placeholder="请选择应急系统" clearable>
                <el-option
                  v-for="dict in dict.type.sys_have_not"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="供暖" prop="wshopHeating">
              <el-select v-model="queryParams.wshopHeating" placeholder="请选择供暖" clearable>
                <el-option
                  v-for="dict in dict.type.heating_system"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="制冷" prop="wshopRefrig">
              <el-select v-model="queryParams.wshopRefrig" placeholder="请选择制冷" clearable>
                <el-option
                  v-for="dict in dict.type.refrigerating_system"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="新风系统" prop="wshopNather">
              <el-select v-model="queryParams.wshopNather" placeholder="请选择新风系统" clearable>
                <el-option
                  v-for="dict in dict.type.sys_have_not"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="电量" prop="wshopPower">
              <el-input
                v-model="queryParams.wshopPower"
                placeholder="请输入电量"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="水" prop="wshopWater">
              <el-select v-model="queryParams.wshopWater" placeholder="请选择水" clearable>
                <el-option
                  v-for="dict in dict.type.water_system"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="区域位置" prop="parkAreaAddress">
              <el-input
                v-model="queryParams.parkAreaAddress"
                placeholder="请输入区域位置"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="需求面积" prop="wshopNeedSize">
              <el-input
                v-model="queryParams.wshopNeedSize"
                placeholder="请输入需求面积"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="公交" prop="parkBus">
              <el-select v-model="queryParams.parkBus" placeholder="请选择公交" clearable>
                <el-option
                  v-for="dict in dict.type.traffic_distance"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="地铁" prop="parkMetro">
              <el-select v-model="queryParams.parkMetro" placeholder="请选择地铁" clearable>
                <el-option
                  v-for="dict in dict.type.traffic_distance"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="浏览量" prop="pageView">
              <el-input
                v-model="queryParams.pageView"
                placeholder="请输入浏览量"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="是否收藏0否1是" prop="collectState">
              <el-input
                v-model="queryParams.collectState"
                placeholder="请输入是否收藏0否1是"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="是否明星推荐0否1是" prop="recState">
              <el-input
                v-model="queryParams.recState"
                placeholder="请输入是否明星推荐0否1是"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="预定状态0未预定1已预定" prop="reserveState">
              <el-input
                v-model="queryParams.reserveState"
                placeholder="请输入预定状态0未预定1已预定"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="明星推荐状态0否1是" prop="recomState">
              <el-select v-model="queryParams.recomState" placeholder="请选择明星推荐状态0否1是" clearable>
                <el-option
                  v-for="dict in dict.type.sys_yes_no"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
            <el-form-item label="联系人" prop="contactName">
              <el-input
                v-model="queryParams.contactName"
                placeholder="请输入联系人"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="联系方式" prop="servicePhone">
              <el-input
                v-model="queryParams.servicePhone"
                placeholder="请输入联系方式"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="联系方式" prop="contactPhone">
              <el-input
                v-model="queryParams.contactPhone"
                placeholder="请输入联系方式"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="发布人用户ID" prop="supplyUserId">
              <el-input
                v-model="queryParams.supplyUserId"
                placeholder="请输入发布人用户ID"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="审核状态：0待审核1审核通过2审核失败" prop="approvalState">
              <el-input
                v-model="queryParams.approvalState"
                placeholder="请输入审核状态：0待审核1审核通过2审核失败"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="审核备注" prop="approvalNote">
              <el-input
                v-model="queryParams.approvalNote"
                placeholder="请输入审核备注"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="园区ID" prop="parkId">
              <el-input
                v-model="queryParams.parkId"
                placeholder="请输入园区ID"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="备注" prop="note">
              <el-input
                v-model="queryParams.note"
                placeholder="请输入备注"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="排序" prop="sort">
              <el-input
                v-model="queryParams.sort"
                placeholder="请输入排序"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="状态0有效1失效" prop="state">
              <el-input
                v-model="queryParams.state"
                placeholder="请输入状态0有效1失效"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="是否删除0否1是" prop="dr">
              <el-input
                v-model="queryParams.dr"
                placeholder="请输入是否删除0否1是"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>
            <el-form-item label="是否置顶0：否1：是" prop="top">
              <el-input
                v-model="queryParams.top"
                placeholder="请输入是否置顶0：否1：是"
                clearable
                @keyup.enter.native="handleQuery"
              />
            </el-form-item>-->
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['industry:workshop:add']"
        >新增
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['industry:workshop:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="info"
          plain
          icon="el-icon-upload2"
          size="mini"
          @click="handleImport"
          v-hasPermi="['industry:workshop:import']"
        >导入
        </el-button>
      </el-col>

      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['industry:workshop:export']"
        >导出
        </el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="workshopList" @selection-change="handleSelectionChange" height="550" fixed>
      <el-table-column type="selection" width="55" align="center"/>
      <el-table-column label="ID" align="center" prop="id"/>
      <el-table-column label="厂房名称" align="center" prop="wshopName"/>
      <el-table-column label="供给类型" align="center" prop="supplyType"/>
      <el-table-column label="关联园区" align="center" prop="parkName"/>
      <el-table-column label="所属城市" align="center" prop="cityName"/>
      <el-table-column label="租赁价格" align="center" prop="wshopLeasePrice"/>
      <el-table-column label="出售价格" align="center" prop="wshopSellPrice"/>
      <el-table-column label="建筑面积" align="center" prop="wshopAllSize"/>
      <el-table-column label="空置面积" align="center" prop="wshopFreeSize"/>
      <el-table-column label="联系人" align="center" prop="contactName" />
      <el-table-column label="联系方式" align="center" prop="contactPhone"  width="120"/>
      <!--      <el-table-column label="厂房层高" align="center" prop="wshopFloorHeight">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.floor_height" :value="scope.row.wshopFloorHeight"/>
              </template>
            </el-table-column>
            <el-table-column label="首层承重" align="center" prop="wshopFirstLoad" />
            <el-table-column label="标准层承重" align="center" prop="wshopLoad" />
            <el-table-column label="地坪材质" align="center" prop="wshopFloorMaterial" />
            <el-table-column label="客梯" align="center" prop="wshopElevatorPeople" />
            <el-table-column label="客梯负载" align="center" prop="wshopElevatorPeopleLoad" />
            <el-table-column label="货梯" align="center" prop="wshopElevatorCargo" />
            <el-table-column label="货梯负载" align="center" prop="wshopElevatorCargoLoad" />
            <el-table-column label="行吊设备" align="center" prop="wshopCrane" />
            <el-table-column label="消防设施" align="center" prop="wshopFireControl">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.fire_fighting_device" :value="scope.row.wshopFireControl ? scope.row.wshopFireControl.split(',') : []"/>
              </template>
            </el-table-column>
            <el-table-column label="应急系统" align="center" prop="wshopEmergency">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.sys_have_not" :value="scope.row.wshopEmergency"/>
              </template>
            </el-table-column>
            <el-table-column label="供暖" align="center" prop="wshopHeating">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.heating_system" :value="scope.row.wshopHeating"/>
              </template>
            </el-table-column>
            <el-table-column label="制冷" align="center" prop="wshopRefrig">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.refrigerating_system" :value="scope.row.wshopRefrig"/>
              </template>
            </el-table-column>
            <el-table-column label="新风系统" align="center" prop="wshopNather">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.sys_have_not" :value="scope.row.wshopNather"/>
              </template>
            </el-table-column>
            <el-table-column label="电量" align="center" prop="wshopPower" />
            <el-table-column label="燃气" align="center" prop="wshopGas">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.gas_system" :value="scope.row.wshopGas ? scope.row.wshopGas.split(',') : []"/>
              </template>
            </el-table-column>
            <el-table-column label="水" align="center" prop="wshopWater">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.water_system" :value="scope.row.wshopWater"/>
              </template>
            </el-table-column>
            <el-table-column label="园区类别" align="center" prop="parkType" />
            <el-table-column label="区域位置" align="center" prop="parkAreaAddress" />
            <el-table-column label="需求面积" align="center" prop="wshopNeedSize" />
            <el-table-column label="公交" align="center" prop="parkBus">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.traffic_distance" :value="scope.row.parkBus"/>
              </template>
            </el-table-column>
            <el-table-column label="地铁" align="center" prop="parkMetro">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.traffic_distance" :value="scope.row.parkMetro"/>
              </template>
            </el-table-column>
            <el-table-column label="所属城市ID" align="center" prop="cityId" />-->
      <el-table-column label="发布类型" align="center" prop="releaseType">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.announce_type" :value="scope.row.releaseType"/>
        </template>
      </el-table-column>
      <!--      <el-table-column label="浏览量" align="center" prop="pageView" />
            <el-table-column label="是否收藏0否1是" align="center" prop="collectState" />
            <el-table-column label="是否明星推荐0否1是" align="center" prop="recState" />
            <el-table-column label="预定状态0未预定1已预定" align="center" prop="reserveState" />
            <el-table-column label="VR资源" align="center" prop="vrResource" />
            <el-table-column label="明星推荐状态0否1是" align="center" prop="recomState">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.recomState"/>
              </template>
            </el-table-column>
            <el-table-column label="图片资源" align="center" prop="imgResource" width="100">
              <template slot-scope="scope">
                <image-preview :src="scope.row.imgResource" :width="50" :height="50"/>
              </template>
            </el-table-column>
            <el-table-column label="封面资源http:p1" align="center" prop="coverResource" width="100">
              <template slot-scope="scope">
                <image-preview :src="scope.row.coverResource" :width="50" :height="50"/>
              </template>
            </el-table-column>
            <el-table-column label="联系人" align="center" prop="contactName" />
            <el-table-column label="联系方式" align="center" prop="servicePhone" />
            <el-table-column label="联系方式" align="center" prop="contactPhone" />
            <el-table-column label="发布人用户ID" align="center" prop="supplyUserId" />-->
      <el-table-column label="审核状态" align="center" prop="approvalState">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.audit_status" :value="scope.row.approvalState"/>
        </template>
      </el-table-column>
      <!--      <el-table-column label="审核备注" align="center" prop="approvalNote" />
            <el-table-column label="园区ID" align="center" prop="parkId" />
            <el-table-column label="备注" align="center" prop="note" />
            <el-table-column label="排序" align="center" prop="sort" />
            <el-table-column label="状态0有效1失效" align="center" prop="state" />
            <el-table-column label="是否删除0否1是" align="center" prop="dr" />
            <el-table-column label="VR封面" align="center" prop="vrcover" width="100">
              <template slot-scope="scope">
                <image-preview :src="scope.row.vrcover" :width="50" :height="50"/>
              </template>
            </el-table-column>
            <el-table-column label="是否置顶0：否1：是" align="center" prop="top" />-->
      <el-table-column width="220" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="handleLook(scope.row)"
          >预览
          </el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-if="userId===scope.row.supplyUserId"
            v-hasPermi="['industry:workshop:edit']"
          >修改
          </el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleSetting(scope.row)"
            v-hasPermi="['industry:building:edit']"
          >查看</el-button>
<!--            v-if="userId!==scope.row.supplyUserId"-->
          <el-button
            style=""
            size="mini"
            type="text"
            icon="el-icon-edit"
            v-if="scope.row.approvalState===0"
            @click="spaceAudit(scope.row)"
            v-hasPermi="['industry:workshop:check']"
          >初审
          </el-button>
          <el-button
            style=""
            size="mini"
            type="text"
            icon="el-icon-edit"
            v-if="scope.row.approvalState===3"
            @click="spaceAudit(scope.row)"
            v-hasPermi="['industry:workshop:recheck']"
          >复审
          </el-button>
          <el-button
            style=""
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleEntrust(scope.row)"
            v-if="scope.row.releaseType===1&&scope.row.approvalState===1"
            v-hasPermi="['industry:workshop:export']"
          >委托
          </el-button>
          <el-button
            size="mini"
            type="text"
            style=""
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-if="userId===scope.row.supplyUserId"
            v-hasPermi="['industry:workshop:remove']"
          >删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改厂房对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="759px" :close-on-click-modal="false" append-to-body center>
      <el-form ref="form" :model="form" :rules="rules" label-width="130px" style="margin-left: 2%; margin-right: 2%">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="基本情况" name="first">
            <el-form-item label="厂房名称" prop="wshopName">
              <el-input v-model="form.wshopName" placeholder="请输入厂房名称" class="workshop" maxlength="50"/>
            </el-form-item>
            <el-row>
              <el-col :span="24">
                <el-form-item label="供给类型" prop="supplyType">
                  <el-checkbox-group v-model="form.supplyType" @change='getCheckboxValue'>
                    <el-checkbox
                      v-for="dict in dict.type.supply_type"
                      :key="dict.value"
                      :label="dict.value">
                      {{ dict.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
              <!--          <el-col :span="24">
                          <el-form-item label="发布类型" prop="releaseType">
                            <el-select v-model="form.releaseType" placeholder="请选择发布类型"
                                       @change='updateRelease(form.releaseType)'
                                       class="workshop">
                              <el-option
                                v-for="dict in dict.type.announce_type"
                                :key="dict.value"
                                :label="dict.label"
                                :value="parseInt(dict.value)"
                              ></el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>-->
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item :label="form.releaseType===0?'租赁价格':'求租价格'" prop="wshopLeasePrice">
                  <el-input v-model="form.wshopLeasePrice" maxlength="50" :disabled='!(checkBoxList.indexOf("出租")>=0)'
                            :placeholder="form.releaseType===0?'请输入租赁价格':'请输入求租价格'"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">元/m²/天</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item :label="form.releaseType===0?'出售价格':'求购价格'" prop="wshopSellPrice">
                  <el-input v-model="form.wshopSellPrice" maxlength="50" :disabled='!(checkBoxList.indexOf("出售")>=0)'
                            :placeholder="form.releaseType===0?'请输入出售价格':'请输入求购价格'"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">元/m²/天</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="转让价格" prop="transferPrice">
              <el-input v-model="form.transferPrice" maxlength="50" oninput="value=value.replace(/[^0-9.]/g,'')"
                        placeholder="请输入转让价格" :disabled='!(checkBoxList.indexOf("转让")>=0)'>
                <template slot="append">元/m²</template>
              </el-input>
            </el-form-item>
            <el-row>
              <el-col :span="24">
                <el-form-item label="建筑总面积" prop="wshopAllSize">
                  <el-input v-model="form.wshopAllSize" @change="handleAcreage" placeholder="请输入总面积"
                            maxlength="50"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">m²</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="空置面积" prop="wshopFreeSize">
                  <el-input v-model="form.wshopFreeSize" @change="handleAcreage" placeholder="请输入空置面积"
                            maxlength="50"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">m²</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="需求面积" prop="wshopNeedSize" v-if="form.releaseType===1">
                  <el-input v-model="form.wshopNeedSize" @change="handleAcreage" placeholder="请输入需求面积"
                            maxlength="50"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">m²</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item>
                  <el-alert
                    title="空置面积大于总面积" class="workshop" v-if="acreage<0" :closable="false" type="error" center
                    show-icon>
                  </el-alert>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="厂房层高" prop="wshopFloorHeight">
                  <el-select v-model="form.wshopFloorHeight" placeholder="请选择厂房层高" class="workshop">
                    <el-option
                      v-for="dict in dict.type.floor_height"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="地坪材质" prop="wshopFloorMaterial">
                  <el-select v-model="form.wshopFloorMaterial" multiple placeholder="请选择地坪材质" class="workshop">
                    <el-option
                      v-for="dict in dict.type.floor_material"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="首层承重" prop="wshopFirstLoad">
                  <el-input v-model="form.wshopFirstLoad" placeholder="请输入首层承重" maxlength="50"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="标准层承重" prop="wshopLoad">
                  <el-input v-model="form.wshopLoad" placeholder="请输入标准层承重" maxlength="50"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="客梯" prop="wshopElevatorPeople">
                  <el-radio-group v-model="form.wshopElevatorPeople" class="workshop">
                    <el-radio :label="'有-'">
                      有
                      <input class="sq" style="width: 50px" oninput="value=value.replace(/[^0-9]/g,'')"
                             v-model="otherElevatorPeople"/>
                      部
                    </el-radio>
                    <el-radio label="无">无</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="客梯负载" prop="wshopElevatorPeopleLoad" v-if="form.wshopElevatorPeople==='有-'">
                  <el-input v-model="form.wshopElevatorPeopleLoad" placeholder="请输入客梯负载" maxlength="50"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="货梯" prop="wshopElevatorCargo">
                  <el-radio-group v-model="form.wshopElevatorCargo" class="workshop">
                    <el-radio :label="'有-'">
                      有
                      <input class="sq" style="width: 50px" oninput="value=value.replace(/[^0-9]/g,'')"
                             v-model="otherElevatorCargo"/>
                      部
                    </el-radio>
                    <el-radio label="无">无</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="货梯负载" prop="wshopElevatorCargoLoad" v-if="form.wshopElevatorCargo==='有-'">
                  <el-input v-model="form.wshopElevatorCargoLoad" placeholder="请输入货梯负载" maxlength="50"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="行吊设备" prop="wshopCrane">
                  <el-radio-group v-model="form.wshopCrane" class="workshop">
                    <el-radio label="'有'">有</el-radio>
                    <el-radio label="'无'">无</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="消防设施" prop="wshopFireControl">
                  <el-checkbox-group v-model="form.wshopFireControl" class="workshop">
                    <el-checkbox
                      v-for="dict in dict.type.fire_fighting_device"
                      :key="dict.value"
                      :label="dict.value">
                      {{ dict.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="应急系统" prop="wshopEmergency">
                  <el-radio-group v-model="form.wshopEmergency" class="workshop">
                    <el-radio
                      v-for="dict in dict.type.sys_have_not"
                      :key="dict.value"
                      :label="dict.value"
                    >{{ dict.label }}
                    </el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="供暖" prop="wshopHeating">
                  <el-select v-model="form.wshopHeating" placeholder="请选择供暖" class="workshop">
                    <el-option
                      v-for="dict in dict.type.heating_system"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="制冷" prop="wshopRefrig">
                  <el-select v-model="form.wshopRefrig" placeholder="请选择制冷" class="workshop">
                    <el-option
                      v-for="dict in dict.type.refrigerating_system"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="新风系统" prop="wshopNather">
                  <el-select v-model="form.wshopNather" placeholder="请选择新风系统" class="workshop">
                    <el-option
                      v-for="dict in dict.type.sys_have_not"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="电量" prop="wshopPower">
                  <el-input v-model="form.wshopPower" placeholder="请输入电量" class="workshop" maxlength="50">
                    <template slot="append">度</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="燃气" prop="wshopGas">
                  <el-checkbox-group v-model="form.wshopGas" class="workshop">
                    <el-radio-group v-model="form.wshopGas">
                      <el-radio
                        v-for="dict in dict.type.gas_system"
                        :key="dict.value"
                        :label="dict.value"
                      >{{ dict.label }}
                      </el-radio>
                    </el-radio-group>
                    <input v-if="form.wshopGas==='其他-'" class="sq" v-model="otherGas" style="width: 20%"
                           placeholder="请输入其他燃气类型"/>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="供水" prop="wshopWater">
                  <el-select v-model="form.wshopWater" placeholder="请选择水" class="workshop">
                    <el-option
                      v-for="dict in dict.type.water_system"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="周边环境" name="second">
            <el-row>
              <el-col :span="24">
                <el-form-item label="关联园区" prop="parkId">
                  <el-select v-model="form.parkId" filterable remote placeholder="请输入关联园区"
                             class="workshop">
                    <el-option v-for="dict in parkList" :key="dict.id"
                               :label="dict.parkName" :value="dict.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="区域位置" prop="parkAreaAddress">
                  <el-select v-model="form.parkAreaAddress" placeholder="请选择区域位置" class="workshop">
                    <el-option
                      v-for="dict in dict.type.regional_position"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="所属城市" prop="cityId">
                  <el-select v-model="form.provinceId" placeholder="请选择省份" style="width: 45%"
                             @change="getCityList(form.provinceId)" clearable>
                    <el-option
                      v-for="dict in provinces"
                      :key="dict.id"
                      :label="dict.name"
                      :value="dict.id"
                    />
                  </el-select>
                  <el-select v-model="form.cityId" placeholder="请选择城市"
                             :disabled="form.provinceId==null||form.provinceId===''"
                             style="width: 45%" clearable>
                    <el-option
                      v-for="dict in citys"
                      :key="dict.id"
                      :label="dict.name"
                      :value="dict.id"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="公交" prop="parkBus">
                  <el-select v-model="form.parkBus" placeholder="请选择公交" class="workshop">
                    <el-option
                      v-for="dict in dict.type.traffic_distance"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="地铁" prop="parkMetro">
                  <el-select v-model="form.parkMetro" placeholder="请选择地铁" class="workshop">
                    <el-option
                      v-for="dict in dict.type.traffic_distance"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

          </el-tab-pane>
          <el-tab-pane label="展示设置" name="third">
            <el-row>
              <!--          <el-col :span="12">
                      <el-form-item label="是否收藏" prop="collectState">
                        <el-select v-model="form.collectState" placeholder="请选择收藏状态" class="workshop">
                          <el-option
                            v-for="dict in dict.type.sys_yes_no"
                            :key="dict.value"
                            :label="dict.label"
                            :value="parseInt(dict.value)"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                        </el-col>-->

              <el-col :span="24">
                <el-form-item label="是否置顶" prop="top">
                  <el-select v-model="form.top" placeholder="是否置顶" class="workshop">
                    <el-option
                      v-for="dict in dict.type.sys_whether"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <!--          <el-col :span="24">-->
              <!--            <el-form-item label="浏览量" prop="pageView">-->
              <!--              <el-input v-model="form.pageView" placeholder="请输入浏览量"-->
              <!--                        oninput="value=value.replace(/[^0-9]/g,'')" class="workshop"/>-->
              <!--            </el-form-item>-->
              <!--          </el-col>-->
              <el-col :span="24">
                <el-form-item label="热门推荐状态" prop="recomState">
                  <el-select v-model="form.recomState" placeholder="热门推荐状态" class="workshop">
                    <el-option
                      v-for="dict in dict.type.recommend"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="明星推荐状态" prop="recState">
                  <el-select v-model="form.recState" placeholder="明星推荐状态" class="workshop">
                    <el-option
                      v-for="dict in dict.type.recommend"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="预定状态" prop="reserveState">
                  <el-select v-model="form.reserveState" placeholder="请选择预订状态" class="workshop">
                    <el-option
                      v-for="dict in dict.type.reserve_type"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="资料上传" name="four">
            <el-form-item label="VR封面" prop="vrcover">
              <image-upload v-model="form.vrcover" :limit="1"/>
            </el-form-item>
            <el-form-item label="VR资源" prop="vrResource">
              <!--          <file-upload v-model="form.vrResource"/>-->
              <video-upload v-model="form.vrResource"/>
            </el-form-item>
            <el-form-item label="图片资源" prop="imgResource">
              <image-upload v-model="form.imgResource"/>
            </el-form-item>
            <el-form-item label="封面资源" prop="coverResource">
              <image-upload v-model="form.coverResource" :limit="1"/>
            </el-form-item>

            <el-form-item label="微信二维码" prop="qrCode">
              <image-upload v-model="form.qrCode" :limit="1"/>
            </el-form-item>
            <el-row>
              <el-col :span="24">
                <el-form-item label="联系人" prop="contactName">
                  <el-input v-model="form.contactName" placeholder="请输入联系人" class="workshop" maxlength="50"/>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="联系方式" prop="contactPhone">
                  <el-input v-model="form.contactPhone" placeholder="请输入联系方式" class="workshop" maxlength="50"/>
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="分配用户" prop="servicePhone" >
              <el-select class="workshop" v-model="form.servicePhone" placeholder="请选择分配用户">
                <el-option
                  v-for="dict in fenpeiList"
                  :key="dict.userId"
                  :label="dict.nickName"
                  :value="dict.userId+''"
                ></el-option>
              </el-select>
            </el-form-item>

            <!--        <el-form-item label="发布人用户ID" prop="supplyUserId">
                      <el-input v-model="form.supplyUserId" placeholder="请输入发布人用户ID" />
                    </el-form-item>
                    <el-form-item label="园区ID" prop="parkId">
                      <el-input v-model="form.parkId" placeholder="请输入园区ID" />
                    </el-form-item>-->
            <el-form-item label="备注" prop="note">
              <el-input v-model="form.note" type="textarea" maxlength="100" class="workshop" show-word-limit
                        placeholder="请输入备注"/>
            </el-form-item>
          </el-tab-pane>
        </el-tabs>
        <!--        <el-form-item label="排序" prop="sort">
                  <el-input v-model="form.sort" placeholder="请输入排序" />
                </el-form-item>
                <el-form-item label="状态0有效1失效" prop="state">
                  <el-input v-model="form.state" placeholder="请输入状态0有效1失效" />
                </el-form-item>
                <el-form-item label="是否删除0否1是" prop="dr">
                  <el-input v-model="form.dr" placeholder="请输入是否删除0否1是" />
                </el-form-item>-->
        <!--        <el-form-item label="审核状态" prop="approvalState">
                  <el-select v-model="form.approvalState" placeholder="请选择审核状态">
                    <el-option
                      v-for="dict in dict.type.audit_status"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="审核意见" prop="approvalNote">
                  <el-input v-model="form.approvalNote" placeholder="请输入审核意见" />
                </el-form-item>-->
        <el-form-item>
          <el-alert
            title="初审通过" type="success" center :closable="false"
            v-if="form.approvalState===1||form.approvalState===3||form.approvalState===4" class="workshop" show-icon>
          </el-alert>
          <el-alert
            title="初审拒绝" type="error" center :closable="false" v-if="form.approvalState===2" class="workshop"
            show-icon>
          </el-alert>
        </el-form-item>
        <el-form-item label="初审意见" prop="approvalNote" v-if="form.approvalState!==0&&form.approvalState!=null">
          <editor v-model="form.approvalNote" :min-height="100" class="workshop" read-only/>
        </el-form-item>
        <el-form-item class="park">
          <el-alert title="复审通过" type="success" center :closable="false" v-if="form.approvalState===1"
                    class="workshop" show-icon>
          </el-alert>
          <el-alert title="复审拒绝" type="error" center :closable="false" v-if="form.approvalState===4"
                    class="workshop" show-icon>
          </el-alert>
        </el-form-item>
        <el-form-item label="复审备注" prop="recheckNote" class="park"
                      v-if="form.approvalState===1||form.approvalState===4">
          <editor v-model="form.recheckNote" :min-height="100" style="width: 100%" class="workshop" read-only/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 设置 -->
    <el-dialog title="仓库详情" :visible.sync="settingUp" close-on-click-modal center width="800px">
      <el-form ref="form" :model="form" :rules="rules" label-width="130px" style="margin-left: 2%; margin-right: 2%"
               disabled>
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="基本情况" name="first">
            <el-form-item label="厂房名称" prop="wshopName">
              <el-input v-model="form.wshopName" placeholder="请输入厂房名称" class="workshop"/>
            </el-form-item>
            <el-row>
              <el-col :span="24">
                <el-form-item :label="form.releaseType===0?'供给类型':'需求类型'" prop="supplyType">
                  <el-checkbox-group v-model="form.supplyType" style="width: 100%" v-if="form.releaseType===0">
                    <el-checkbox
                      v-for="dict in dict.type.supply_type"
                      :key="dict.value"
                      :label="dict.value">
                      {{ dict.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                  <el-checkbox-group v-model="form.supplyType" style="width: 100%" v-else>
                    <el-checkbox
                      v-for="dict in dict.type.need_mode"
                      :key="dict.value"
                      :label="dict.value">
                      {{ dict.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="发布类型" prop="releaseType">
                  <el-select v-model="form.releaseType" placeholder="请选择发布类型"
                             @change='updateRelease(form.releaseType)'
                             class="workshop">
                    <el-option
                      v-for="dict in dict.type.announce_type"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item :label="form.releaseType===0?'租赁价格':'求租价格'" prop="wshopLeasePrice">
                  <el-input v-model="form.wshopLeasePrice"
                            :placeholder="form.releaseType===0?'请输入租赁价格':'请输入求租价格'"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">元/m²/天</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item :label="form.releaseType===0?'出售价格':'求购价格'" prop="wshopSellPrice">
                  <el-input v-model="form.wshopSellPrice"
                            :placeholder="form.releaseType===0?'请输入出售价格':'请输入求购价格'"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">元/m²/天</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="转让价格" prop="transferPrice">
              <el-input v-model="form.transferPrice" maxlength="50" oninput="value=value.replace(/[^0-9.]/g,'')"
                        placeholder="请输入转让价格">
                <template slot="append">元/m²</template>
              </el-input>
            </el-form-item>
            <el-row>
              <el-col :span="24">
                <el-form-item label="建筑总面积" prop="wshopAllSize" v-if="form.releaseType===0">
                  <el-input v-model="form.wshopAllSize" placeholder="请输入总面积"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">m²</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="空置面积" prop="wshopFreeSize" v-if="form.releaseType===0">
                  <el-input v-model="form.wshopFreeSize" placeholder="请输入空置面积"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">m²</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="需求面积" prop="wshopNeedSize" v-if="form.releaseType===1">
                  <el-input v-model="form.wshopNeedSize" placeholder="请输入需求面积"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">m²</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="厂房层高" prop="wshopFloorHeight">
                  <el-select v-model="form.wshopFloorHeight" placeholder="请选择厂房层高" class="workshop">
                    <el-option
                      v-for="dict in dict.type.floor_height"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="地坪材质" prop="wshopFloorMaterial">
                  <el-select v-model="form.wshopFloorMaterial" multiple placeholder="请选择地坪材质" class="workshop">
                    <el-option
                      v-for="dict in dict.type.floor_material"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="首层承重" prop="wshopFirstLoad">
                  <el-input v-model="form.wshopFirstLoad" placeholder="请输入首层承重"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="标准层承重" prop="wshopLoad">
                  <el-input v-model="form.wshopLoad" placeholder="请输入标准层承重"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="客梯" prop="wshopElevatorPeople">
                  <el-radio-group v-model="form.wshopElevatorPeople" class="workshop">
                    <el-radio :label="'有-'">
                      有
                      <input class="sq" style="width: 50px" oninput="value=value.replace(/[^0-9]/g,'')"
                             v-model="otherElevatorPeople" disabled/>
                      部
                    </el-radio>
                    <el-radio label="无">无</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="客梯负载" prop="wshopElevatorPeopleLoad" v-if="form.wshopElevatorPeople==='有-'">
                  <el-input v-model="form.wshopElevatorPeopleLoad" placeholder="请输入客梯负载"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="货梯" prop="wshopElevatorCargo">
                  <el-radio-group v-model="form.wshopElevatorCargo" class="workshop">
                    <el-radio :label="'有-'">
                      有
                      <input class="sq" style="width: 50px" oninput="value=value.replace(/[^0-9]/g,'')"
                             v-model="otherElevatorCargo" disabled/>
                      部
                    </el-radio>
                    <el-radio label="无">无</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="货梯负载" prop="wshopElevatorCargoLoad" v-if="form.wshopElevatorCargo==='有-'">
                  <el-input v-model="form.wshopElevatorCargoLoad" placeholder="请输入货梯负载"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="行吊设备" prop="wshopCrane">
                  <el-radio-group v-model="form.wshopCrane" class="workshop">
                    <el-radio label="'有'">有</el-radio>
                    <el-radio label="'无'">无</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="消防设施" prop="wshopFireControl">
                  <el-checkbox-group v-model="form.wshopFireControl" class="workshop">
                    <el-checkbox
                      v-for="dict in dict.type.fire_fighting_device"
                      :key="dict.value"
                      :label="dict.value">
                      {{ dict.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="应急系统" prop="wshopEmergency">
                  <el-radio-group v-model="form.wshopEmergency" class="workshop">
                    <el-radio
                      v-for="dict in dict.type.sys_have_not"
                      :key="dict.value"
                      :label="dict.value"
                    >{{ dict.label }}
                    </el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="供暖" prop="wshopHeating">
                  <el-select v-model="form.wshopHeating" placeholder="请选择供暖" class="workshop">
                    <el-option
                      v-for="dict in dict.type.heating_system"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="制冷" prop="wshopRefrig">
                  <el-select v-model="form.wshopRefrig" placeholder="请选择制冷" class="workshop">
                    <el-option
                      v-for="dict in dict.type.refrigerating_system"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="新风系统" prop="wshopNather">
                  <el-select v-model="form.wshopNather" placeholder="请选择新风系统" class="workshop">
                    <el-option
                      v-for="dict in dict.type.sys_have_not"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="电量" prop="wshopPower">
                  <el-input v-model="form.wshopPower" placeholder="请输入电量" class="workshop">
                    <template slot="append">度</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="燃气" prop="wshopGas">
                  <el-checkbox-group v-model="form.wshopGas" class="workshop">
                    <el-radio-group v-model="form.wshopGas">
                      <el-radio
                        v-for="dict in dict.type.gas_system"
                        :key="dict.value"
                        :label="dict.value"
                      >{{ dict.label }}
                      </el-radio>
                    </el-radio-group>
                    <input v-if="form.wshopGas==='其他-'" class="sq" v-model="otherGas" style="width: 20%"
                           placeholder="请输入其他燃气类型" disabled/>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="供水" prop="wshopWater">
                  <el-select v-model="form.wshopWater" placeholder="请选择水" class="workshop">
                    <el-option
                      v-for="dict in dict.type.water_system"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="周边环境" name="second">
            <el-row>
              <el-col :span="24">
                <el-form-item label="关联园区" prop="parkId">
                  <el-select v-model="form.parkId" filterable remote placeholder="请输入关联园区"
                             class="workshop">
                    <el-option v-for="dict in parkList" :key="dict.id"
                               :label="dict.parkName" :value="dict.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="区域位置" prop="parkAreaAddress">
                  <el-select v-model="form.parkAreaAddress" placeholder="请选择区域位置" class="workshop">
                    <el-option
                      v-for="dict in dict.type.regional_position"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="所属城市" prop="cityId">
                  <el-select v-model="form.provinceId" placeholder="请选择省份" style="width: 45%"
                             @change="getCityList(form.provinceId)" clearable>
                    <el-option
                      v-for="dict in provinces"
                      :key="dict.id"
                      :label="dict.name"
                      :value="dict.id"
                    />
                  </el-select>
                  <el-select v-model="form.cityId" placeholder="请选择城市"
                             :disabled="form.provinceId==null||form.provinceId===''"
                             style="width: 45%" clearable>
                    <el-option
                      v-for="dict in citys"
                      :key="dict.id"
                      :label="dict.name"
                      :value="dict.id"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="公交" prop="parkBus">
                  <el-select v-model="form.parkBus" placeholder="请选择公交" class="workshop">
                    <el-option
                      v-for="dict in dict.type.traffic_distance"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="地铁" prop="parkMetro">
                  <el-select v-model="form.parkMetro" placeholder="请选择地铁" class="workshop">
                    <el-option
                      v-for="dict in dict.type.traffic_distance"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="展示设置" name="third" v-if="form.approvalState===1">
            <el-form ref="form" :model="form" :rules="rules" label-width="130px" style="margin-left: 2%; margin-right: 2%"
                     v-if="form.approvalState===1">
              <el-row>
                <el-col :span="24">
                  <el-form-item label="是否置顶" prop="top">
                    <el-select v-model="form.top" placeholder="是否置顶" class="workshop">
                      <el-option
                        v-for="dict in dict.type.sys_whether"
                        :key="dict.value"
                        :label="dict.label"
                        :value="parseInt(dict.value)"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="热门推荐状态" prop="recomState">
                    <el-select v-model="form.recomState" placeholder="热门推荐状态" class="workshop">
                      <el-option
                        v-for="dict in dict.type.recommend"
                        :key="dict.value"
                        :label="dict.label"
                        :value="parseInt(dict.value)"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="明星推荐状态" prop="recState">
                    <el-select v-model="form.recState" placeholder="明星推荐状态" class="workshop">
                      <el-option
                        v-for="dict in dict.type.recommend"
                        :key="dict.value"
                        :label="dict.label"
                        :value="parseInt(dict.value)"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="预定状态" prop="reserveState">
                    <el-select v-model="form.reserveState" placeholder="请选择预订状态" class="workshop">
                      <el-option
                        v-for="dict in dict.type.reserve_type"
                        :key="dict.value"
                        :label="dict.label"
                        :value="parseInt(dict.value)"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="分配用户" prop="servicePhone">
                    <el-select class="workshop" v-model="form.servicePhone" placeholder="请选择分配用户">
                      <el-option
                        v-for="dict in fenpeiList"
                        :key="dict.userId"
                        :label="dict.nickName"
                        :value="dict.userId+''"
                      ></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
          </el-tab-pane>
          <el-tab-pane label="资料上传" name="four">
            <el-form-item label="VR封面" prop="vrcover">
              <image-upload v-model="form.vrcover" :limit="1"/>
            </el-form-item>
            <el-form-item label="VR资源" prop="vrResource">
              <video-upload v-model="form.vrResource"/>
            </el-form-item>
            <el-form-item label="图片资源" prop="imgResource">
              <image-upload v-model="form.imgResource"/>
            </el-form-item>
            <el-form-item label="封面资源" prop="coverResource">
              <image-upload v-model="form.coverResource" :limit="1"/>
            </el-form-item>

            <el-form-item label="微信二维码" prop="qrCode">
              <image-upload v-model="form.qrCode" :limit="1"/>
            </el-form-item>
            <el-row>
              <el-col :span="24">
                <el-form-item label="联系人" prop="contactName">
                  <el-input v-model="form.contactName" placeholder="请输入联系人" class="workshop"/>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="联系方式" prop="contactPhone">
                  <el-input v-model="form.contactPhone" placeholder="请输入联系方式" class="workshop"/>
                </el-form-item>
              </el-col>
            </el-row>
<!--            <el-form-item label="分配用户" prop="servicePhone" >
              <el-select class="workshop" v-model="form.servicePhone" placeholder="请选择分配用户">
                <el-option
                  v-for="dict in fenpeiList"
                  :key="dict.userId"
                  :label="dict.nickName"
                  :value="dict.userId+''"
                ></el-option>
              </el-select>
            </el-form-item>-->
            <el-form-item label="备注" prop="note">
              <el-input v-model="form.note" type="textarea" maxlength="100" class="workshop" show-word-limit
                        placeholder="请输入备注"/>
            </el-form-item>
          </el-tab-pane>
        </el-tabs>
        <el-form-item>
          <el-alert
            title="初审通过" type="success" center :closable="false"
            v-if="form.approvalState===1||form.approvalState===3||form.approvalState===4" class="workshop" show-icon>
          </el-alert>
          <el-alert
            title="初审拒绝" type="error" center :closable="false" v-if="form.approvalState===2" class="workshop"
            show-icon>
          </el-alert>
        </el-form-item>
        <el-form-item label="初审意见" prop="approvalNote" v-if="form.approvalState!==0&&form.approvalState!=null">
          <editor v-model="form.approvalNote" :min-height="100" class="workshop" read-only/>
        </el-form-item>
        <el-form-item class="park">
          <el-alert title="复审通过" type="success" center :closable="false" v-if="form.approvalState===1"
                    class="workshop" show-icon>
          </el-alert>
          <el-alert title="复审拒绝" type="error" center :closable="false" v-if="form.approvalState===4"
                    class="workshop" show-icon>
          </el-alert>
        </el-form-item>
        <el-form-item label="复审备注" prop="recheckNote" class="park"
                      v-if="form.approvalState===1||form.approvalState===4">
          <editor v-model="form.recheckNote" :min-height="100" class="workshop" read-only/>
        </el-form-item>
      </el-form>

      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitSet">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 审核 -->
    <el-dialog title="厂房审核" :visible.sync="wshopAudit" close-on-click-modal center width="750px">
      <el-form ref="form" :model="form" :rules="rules" label-width="130px" style="margin-left: 2%; margin-right: 2%"
               disabled>
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="基本情况" name="first">
            <el-form-item label="厂房名称" prop="wshopName">
              <el-input v-model="form.wshopName" placeholder="请输入厂房名称" class="workshop"/>
            </el-form-item>
            <el-row>
              <el-col :span="24">
                <el-form-item :label="form.releaseType===0?'供给类型':'需求类型'" prop="supplyType">
                  <el-checkbox-group v-model="form.supplyType" style="width: 100%" v-if="form.releaseType===0">
                    <el-checkbox
                      v-for="dict in dict.type.supply_type"
                      :key="dict.value"
                      :label="dict.value">
                      {{ dict.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                  <el-checkbox-group v-model="form.supplyType" style="width: 100%" v-else>
                    <el-checkbox
                      v-for="dict in dict.type.need_mode"
                      :key="dict.value"
                      :label="dict.value">
                      {{ dict.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="发布类型" prop="releaseType">
                  <el-select v-model="form.releaseType" placeholder="请选择发布类型"
                             @change='updateRelease(form.releaseType)'
                             class="workshop">
                    <el-option
                      v-for="dict in dict.type.announce_type"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item :label="form.releaseType===0?'租赁价格':'求租价格'" prop="wshopLeasePrice">
                  <el-input v-model="form.wshopLeasePrice"
                            :placeholder="form.releaseType===0?'请输入租赁价格':'请输入求租价格'"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">元/m²/天</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item :label="form.releaseType===0?'出售价格':'求购价格'" prop="wshopSellPrice">
                  <el-input v-model="form.wshopSellPrice"
                            :placeholder="form.releaseType===0?'请输入出售价格':'请输入求购价格'"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">元/m²/天</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="转让价格" prop="transferPrice">
              <el-input v-model="form.transferPrice" maxlength="50" oninput="value=value.replace(/[^0-9.]/g,'')"
                        placeholder="请输入转让价格">
                <template slot="append">元/m²</template>
              </el-input>
            </el-form-item>
            <el-row>
              <el-col :span="24">
                <el-form-item label="建筑总面积" prop="wshopAllSize" v-if="form.releaseType===0">
                  <el-input v-model="form.wshopAllSize" placeholder="请输入总面积"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">m²</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="空置面积" prop="wshopFreeSize" v-if="form.releaseType===0">
                  <el-input v-model="form.wshopFreeSize" placeholder="请输入空置面积"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">m²</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="需求面积" prop="wshopNeedSize" v-if="form.releaseType===1">
                  <el-input v-model="form.wshopNeedSize" placeholder="请输入需求面积"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">m²</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="厂房层高" prop="wshopFloorHeight">
                  <el-select v-model="form.wshopFloorHeight" placeholder="请选择厂房层高" class="workshop">
                    <el-option
                      v-for="dict in dict.type.floor_height"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="地坪材质" prop="wshopFloorMaterial">
                  <el-select v-model="form.wshopFloorMaterial" multiple placeholder="请选择地坪材质" class="workshop">
                    <el-option
                      v-for="dict in dict.type.floor_material"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="首层承重" prop="wshopFirstLoad">
                  <el-input v-model="form.wshopFirstLoad" placeholder="请输入首层承重"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="标准层承重" prop="wshopLoad">
                  <el-input v-model="form.wshopLoad" placeholder="请输入标准层承重"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="客梯" prop="wshopElevatorPeople">
                  <el-radio-group v-model="form.wshopElevatorPeople" class="workshop">
                    <el-radio :label="'有-'">
                      有
                      <input class="sq" style="width: 50px" oninput="value=value.replace(/[^0-9]/g,'')"
                             v-model="otherElevatorPeople" disabled/>
                      部
                    </el-radio>
                    <el-radio label="无">无</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="客梯负载" prop="wshopElevatorPeopleLoad" v-if="form.wshopElevatorPeople==='有-'">
                  <el-input v-model="form.wshopElevatorPeopleLoad" placeholder="请输入客梯负载"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="货梯" prop="wshopElevatorCargo">
                  <el-radio-group v-model="form.wshopElevatorCargo" class="workshop">
                    <el-radio :label="'有-'">
                      有
                      <input class="sq" style="width: 50px" oninput="value=value.replace(/[^0-9]/g,'')"
                             v-model="otherElevatorCargo" disabled/>
                      部
                    </el-radio>
                    <el-radio label="无">无</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="货梯负载" prop="wshopElevatorCargoLoad" v-if="form.wshopElevatorCargo==='有-'">
                  <el-input v-model="form.wshopElevatorCargoLoad" placeholder="请输入货梯负载"
                            oninput="value=value.replace(/[^0-9.]/g,'')"
                            class="workshop">
                    <template slot="append">kg</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="行吊设备" prop="wshopCrane">
                  <el-radio-group v-model="form.wshopCrane" class="workshop">
                    <el-radio label="'有'">有</el-radio>
                    <el-radio label="'无'">无</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="消防设施" prop="wshopFireControl">
                  <el-checkbox-group v-model="form.wshopFireControl" class="workshop">
                    <el-checkbox
                      v-for="dict in dict.type.fire_fighting_device"
                      :key="dict.value"
                      :label="dict.value">
                      {{ dict.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="应急系统" prop="wshopEmergency">
                  <el-radio-group v-model="form.wshopEmergency" class="workshop">
                    <el-radio
                      v-for="dict in dict.type.sys_have_not"
                      :key="dict.value"
                      :label="dict.value"
                    >{{ dict.label }}
                    </el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="供暖" prop="wshopHeating">
                  <el-select v-model="form.wshopHeating" placeholder="请选择供暖" class="workshop">
                    <el-option
                      v-for="dict in dict.type.heating_system"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="制冷" prop="wshopRefrig">
                  <el-select v-model="form.wshopRefrig" placeholder="请选择制冷" class="workshop">
                    <el-option
                      v-for="dict in dict.type.refrigerating_system"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="新风系统" prop="wshopNather">
                  <el-select v-model="form.wshopNather" placeholder="请选择新风系统" class="workshop">
                    <el-option
                      v-for="dict in dict.type.sys_have_not"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="电量" prop="wshopPower">
                  <el-input v-model="form.wshopPower" placeholder="请输入电量" class="workshop">
                    <template slot="append">度</template>
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="燃气" prop="wshopGas">
                  <el-checkbox-group v-model="form.wshopGas" class="workshop">
                    <el-radio-group v-model="form.wshopGas">
                      <el-radio
                        v-for="dict in dict.type.gas_system"
                        :key="dict.value"
                        :label="dict.value"
                      >{{ dict.label }}
                      </el-radio>
                    </el-radio-group>
                    <input v-if="form.wshopGas==='其他-'" class="sq" v-model="otherGas" style="width: 20%"
                           placeholder="请输入其他燃气类型" disabled/>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="供水" prop="wshopWater">
                  <el-select v-model="form.wshopWater" placeholder="请选择水" class="workshop">
                    <el-option
                      v-for="dict in dict.type.water_system"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="周边环境" name="second">
            <el-row>
              <el-col :span="24">
                <el-form-item label="关联园区" prop="parkId">
                  <el-select v-model="form.parkId" filterable remote placeholder="请输入关联园区"
                             class="workshop">
                    <el-option v-for="dict in parkList" :key="dict.id"
                               :label="dict.parkName" :value="dict.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="区域位置" prop="parkAreaAddress">
                  <el-select v-model="form.parkAreaAddress" placeholder="请选择区域位置" class="workshop">
                    <el-option
                      v-for="dict in dict.type.regional_position"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="所属城市" prop="cityId">
                  <el-select v-model="form.provinceId" placeholder="请选择省份" style="width: 45%"
                             @change="getCityList(form.provinceId)" clearable>
                    <el-option
                      v-for="dict in provinces"
                      :key="dict.id"
                      :label="dict.name"
                      :value="dict.id"
                    />
                  </el-select>
                  <el-select v-model="form.cityId" placeholder="请选择城市"
                             :disabled="form.provinceId==null||form.provinceId===''"
                             style="width: 45%" clearable>
                    <el-option
                      v-for="dict in citys"
                      :key="dict.id"
                      :label="dict.name"
                      :value="dict.id"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>

            <el-row>
              <el-col :span="24">
                <el-form-item label="公交" prop="parkBus">
                  <el-select v-model="form.parkBus" placeholder="请选择公交" class="workshop">
                    <el-option
                      v-for="dict in dict.type.traffic_distance"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="地铁" prop="parkMetro">
                  <el-select v-model="form.parkMetro" placeholder="请选择地铁" class="workshop">
                    <el-option
                      v-for="dict in dict.type.traffic_distance"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-tab-pane>
          <el-tab-pane label="资料上传" name="four">
            <el-form-item label="VR封面" prop="vrcover">
              <image-upload v-model="form.vrcover" :limit="1"/>
            </el-form-item>
            <el-form-item label="VR资源" prop="vrResource">
              <video-upload v-model="form.vrResource"/>
            </el-form-item>
            <el-form-item label="图片资源" prop="imgResource">
              <image-upload v-model="form.imgResource"/>
            </el-form-item>
            <el-form-item label="封面资源" prop="coverResource">
              <image-upload v-model="form.coverResource" :limit="1"/>
            </el-form-item>

            <el-form-item label="微信二维码" prop="qrCode">
              <image-upload v-model="form.qrCode" :limit="1"/>
            </el-form-item>
            <el-row>
              <el-col :span="24">
                <el-form-item label="联系人" prop="contactName">
                  <el-input v-model="form.contactName" placeholder="请输入联系人" class="workshop"/>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="联系方式" prop="contactPhone">
                  <el-input v-model="form.contactPhone" placeholder="请输入联系方式" class="workshop"/>
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="分配用户" prop="servicePhone" >
              <el-select class="workshop" v-model="form.servicePhone" placeholder="请选择分配用户">
                <el-option
                  v-for="dict in fenpeiList"
                  :key="dict.userId"
                  :label="dict.nickName"
                  :value="dict.userId+''"
                ></el-option>
              </el-select>
            </el-form-item>

            <el-form-item label="备注" prop="note">
              <el-input v-model="form.note" type="textarea" maxlength="100" class="workshop" show-word-limit
                        placeholder="请输入备注"/>
            </el-form-item>
          </el-tab-pane>
        </el-tabs>
        <el-form-item >
          <el-alert
            title="初审通过" type="success" center :closable="false" v-if="form.approvalState===1||form.approvalState===3||form.approvalState===4" class="workshop" show-icon>
          </el-alert>
          <el-alert
            title="初审拒绝" type="error" center :closable="false" v-if="form.approvalState===2" class="workshop" show-icon>
          </el-alert>
        </el-form-item>
        <el-form-item label="初审意见" prop="approvalNote" v-if="form.approvalState!==0&&form.approvalState!=null" >
          <editor v-model="form.approvalNote" :min-height="100" class="workshop"  read-only/>
        </el-form-item>
        <el-form-item class="park">
          <el-alert title="复审通过" type="success" center :closable="false" v-if="form.approvalState===1" class="workshop" show-icon>
          </el-alert>
          <el-alert title="复审拒绝" type="error" center :closable="false" v-if="form.approvalState===4" class="workshop" show-icon>
          </el-alert>
        </el-form-item>
        <el-form-item label="复审备注" prop="recheckNote" class="park" v-if="form.approvalState===1||form.approvalState===4">
          <editor v-model="form.recheckNote" :min-height="100" class="workshop" read-only/>
        </el-form-item>
      </el-form>
      <el-form :model="form" label-width="130px">
        <el-form-item label="初审意见" prop="approvalNote" v-if="form.approvalState===0">
          <my-editor v-model="form.approvalNote" :min-height="100" class="workshop"/>
        </el-form-item>
        <el-form-item label="复审备注" prop="recheckNote" class="park" v-if="form.approvalState===3">
          <my-editor v-model="form.recheckNote" :min-height="100" class="workshop"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="success" v-if="form.approvalState===0" @click="submitCheck(3)">初审通过</el-button>
        <el-button type="success" v-if="form.approvalState===3" @click="submitCheck(1)">复审通过</el-button>
        <span style="width: 5%;display: inline-block"></span>
        <el-button type="danger" v-if="form.approvalState===0" @click="submitCheck(2)">审核驳回</el-button>
        <el-button type="danger" v-if="form.approvalState===3" @click="submitCheck(4)">审核驳回</el-button>
        <span style="width: 5%;display: inline-block"></span>
        <el-button type="info" @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 用户导入对话框 -->
    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
      <el-upload
        ref="upload"
        :limit="1"
        accept=".xlsx, .xls"
        :headers="upload.headers"
        :action="upload.url + '?updateSupport=' + upload.updateSupport"
        :disabled="upload.isUploading"
        :on-progress="handleFileUploadProgress"
        :on-success="handleFileSuccess"
        :auto-upload="false"
        drag
      >
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
<!--          <div class="el-upload__tip" slot="tip">-->
<!--            <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据-->
<!--          </div>-->
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFileForm">确 定</el-button>
        <el-button @click="upload.open = false">取 消</el-button>
      </div>
    </el-dialog>

  </div>
</template>

<script>
import {addWorkshop, delWorkshop, getEntrust, getWorkshop, listWorkshop, updateWorkshop} from "@/api/industry/workshop";
import {listCity} from "@/api/business/businessIntro";
import {parkList} from "@/api/industry/park";
import VideoUpload from "@/components/VideoUpload";
import MyEditor from "@/components/wangEdiot";
import {getToken} from "@/utils/auth";
import {listUser} from "@/api/system/user";

export default {
  name: "Workshop",
  components: {MyEditor, VideoUpload},
  dicts: ['floor_height', 'floor_material', 'need_mode', 'recommend', 'sys_whether', 'reserve_type', 'regional_position', 'audit_status', 'sys_yes_no', 'sys_have_not', 'announce_type', 'supply_type', 'park_type', 'selling_price', 'rental_price', 'industry_orientation', 'heating_system', 'traffic_distance', 'sys_yes_no', 'refrigerating_system', 'gas_system', 'fire_fighting_device', 'water_system'],
  data() {
    return {
      activeName: 'first',
      // dialog 选择框的值
      checkBoxList:[],
      fenpeiList:[],
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      //省份
      provinces: [],
      //城市
      citys: [],
      //园区列表
      parkList: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 厂房表格数据
      workshopList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      //设置弹窗
      settingUp: false,
      //审核弹窗
      wshopAudit: false,
      //客梯数量
      otherElevatorPeople: null,
      //货梯数量
      otherElevatorCargo: null,
      //其他燃气
      otherGas: null,
      //用户id
      userId: null,
      acreage:0,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        wshopName: null,
        supplyType: null,
        wshopLeasePrice: null,
        wshopSellPrice: null,
        transferPrice: null,
        wshopAllSize: null,
        wshopFreeSize: null,
        wshopFloorHeight: null,
        wshopFirstLoad: null,
        wshopLoad: null,
        wshopFloorMaterial: null,
        wshopElevatorPeople: null,
        wshopElevatorPeopleLoad: null,
        wshopElevatorCargo: null,
        wshopElevatorCargoLoad: null,
        wshopCrane: null,
        wshopFireControl: null,
        wshopEmergency: null,
        wshopHeating: null,
        wshopRefrig: null,
        wshopNather: null,
        wshopPower: null,
        wshopGas: null,
        wshopWater: null,
        parkType: null,
        parkAreaAddress: null,
        wshopNeedSize: null,
        parkBus: null,
        parkMetro: null,
        provinceId: null,
        parkIndustry: null,
        cityId: null,
        releaseType: null,
        pageView: null,
        collectState: null,
        recState: null,
        reserveState: null,
        vrResource: null,
        recomState: null,
        imgResource: null,
        coverResource: null,
        contactName: null,
        servicePhone: null,
        contactPhone: null,
        supplyUserId: null,
        approvalState: null,
        approvalNote: null,
        recheckNote: null,
        parkId: null,
        note: null,
        sort: null,
        state: null,
        dr: null,
        vrcover: null,
        top: null
      },
      // 表单参数
      form: {},
      // 用户导入参数
      upload: {
        // 是否显示弹出层（用户导入）
        open: false,
        // 弹出层标题（用户导入）
        title: "",
        // 是否禁用上传
        isUploading: false,
        // 是否更新已经存在的用户数据
        updateSupport: 0,
        // 设置上传的请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "industry/workshop/importData"
      },
      // 表单校验
      rules: {
        contactName: [
          {required: true, message: "联系人不能为空", trigger: "blur"}
        ],
        contactPhone: [
          {required: true, message: "联系方式不能为空", trigger: "blur"},
          {
            required: true,
            pattern: /^[1][3,4,5,7,8,9][0-9]{9}$/,
            message: '请输入正确的手机号码',
            trigger: 'blur',
          },
        ],
        wshopName: [
          {required: true, message: "厂房名称不能为空", trigger: "blur"}
        ],
        supplyType: [
          {required: true, message: "供给类型不能为空", trigger: "blur"}
        ],
        releaseType: [
          {required: true, message: "发布类型不能为空", trigger: "blur"}
        ],
        wshopAllSize: [
          {required: true, message: "建筑总面积不能为空", trigger: "blur"}
        ],
        cityId: [
          {required: true, message: "所属城市不能为空", trigger: "blur"}
        ],
        coverResource: [
          {required: true, message: "封面资源不能为空", trigger: "blur"}
        ],
        imgResource: [
          {required: true, message: "图片资源不能为空", trigger: "blur"}
        ],

      }
    };
  },
  created() {
    this.getList();
    this.getprovinceList();
    listUser(this.addDateRange({
      pageNum: 1,
      pageSize: 9999999
    }, [])).then(response => {
        this.fenpeiList = response.rows;
        this.fenpeiList = this.fenpeiList.filter(t => t.userId != 1)
      }
    )
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    // 获取多选框val 控制价格出售输入
    getCheckboxValue(e){
      if (e!=null) {
        this.checkBoxList =e
      }
    },
    //预览
    handleLook(row) {
      //http://120.46.220.152/#/pages/index/details?id=339&buildType=4&spaceId=dc46adbfb2944da39078f61446cd662f&provinceId=34
      // window.location.href=`http://120.46.220.152/#/pages/news/details?id=`+id
      open(`http://120.46.220.152/#/pages/index/details?id=`+row.id+`&buildType=5&spaceId=` + row.serialNumber + `&provinceId=` + row.provinceId)
    },
    //面积
    handleAcreage(){
      if (this.form.wshopAllSize!=null&&this.form.wshopFreeSize!=null){
        this.acreage = this.form.wshopAllSize-this.form.wshopFreeSize
      }
    },
    /** 查询厂房列表 */
    getList() {
      this.userId = this.$store.getters.id
      this.loading = true;
      listWorkshop(this.queryParams).then(response => {
        this.workshopList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.wshopAudit = false;
      this.settingUp = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.activeName="first";
      this.otherElevatorPeople = null;
      this.otherElevatorCargo = null;
      this.otherGas = null;
      this.form = {
        id: null,
        wshopName: null,
        supplyType: [],
        wshopLeasePrice: null,
        wshopSellPrice: null,
        transferPrice: null,
        wshopAllSize: null,
        wshopFreeSize: null,
        wshopFloorHeight: null,
        wshopFirstLoad: null,
        wshopLoad: null,
        wshopFloorMaterial: [],
        wshopElevatorPeople: null,
        wshopElevatorPeopleLoad: null,
        wshopElevatorCargo: null,
        wshopElevatorCargoLoad: null,
        wshopCrane: null,
        wshopFireControl: [],
        wshopEmergency: null,
        wshopHeating: null,
        wshopRefrig: null,
        wshopNather: null,
        wshopPower: null,
        wshopGas: null,
        wshopWater: null,
        parkType: null,
        parkAreaAddress: null,
        wshopNeedSize: null,
        parkBus: null,
        parkMetro: null,
        cityId: null,
        releaseType: 0,
        pageView: null,
        collectState: null,
        recState: null,
        reserveState: null,
        vrResource: null,
        recomState: null,
        imgResource: null,
        coverResource: null,
        contactName: null,
        servicePhone: null,
        contactPhone: null,
        supplyUserId: null,
        approvalState: null,
        approvalNote: null,
        recheckNote: null,
        parkId: null,
        note: null,
        sort: null,
        state: null,
        dr: null,
        createTime: null,
        updateTime: null,
        vrcover: null,
        top: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.getParkList();
      this.open = true;
      this.title = "添加厂房";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      this.getParkList();
      getWorkshop(id).then(response => {
        this.form = response.data;
        if (this.form.supplyType!==null){
          this.form.supplyType = this.form.supplyType.split(",")
          this.checkBoxList=this.form.supplyType
        }
        if (this.form.wshopFireControl !== null ) {
          this.form.wshopFireControl = this.form.wshopFireControl.split(",");
        }
        if (this.form.wshopFloorMaterial !== null) {
          this.form.wshopFloorMaterial = this.form.wshopFloorMaterial.split(",");
        }
        // this.form.wshopGas = this.form.wshopGas.split(",");
        //客梯
        if (response.data.wshopElevatorPeople != null && response.data.wshopElevatorPeople.indexOf("有-") !== -1) {
          this.otherElevatorPeople = response.data.wshopElevatorPeople
          this.otherElevatorPeople = this.otherElevatorPeople.substring(this.otherElevatorPeople.indexOf("有-") + 2)
          this.form.wshopElevatorPeople = this.form.wshopElevatorPeople.substring(0, this.form.wshopElevatorPeople.indexOf("有-") + 2)
        }
        //货梯
        if (response.data.wshopElevatorCargo != null && response.data.wshopElevatorCargo.indexOf("有-") !== -1) {
          this.otherElevatorCargo = response.data.wshopElevatorCargo
          this.otherElevatorCargo = this.otherElevatorCargo.substring(this.otherElevatorCargo.indexOf("有-") + 2)
          this.form.wshopElevatorCargo = this.form.wshopElevatorCargo.substring(0, this.form.wshopElevatorCargo.indexOf("有-") + 2)
        }
        //燃气
        if (response.data.wshopGas != null && response.data.wshopGas.includes("其他-")) {
          this.otherGas = response.data.wshopGas
          this.form.wshopGas = this.form.wshopGas.substring(0, response.data.wshopGas.indexOf("其他-") + 3);
          this.otherGas = this.otherGas.substring(this.otherGas.indexOf("其他-") + 3);
        }
        if (response.data.provinceId != null && response.data.provinceId !== '') {
          listCity(response.data.provinceId).then(rest => {
            this.citys = rest.data;
          })
        }
        this.open = true;
        this.title = "修改厂房";
        const old_Form=this.form
        localStorage.setItem('old_Form',JSON.stringify(old_Form));
      });
    },
    /** 设置 */
    handleSetting(row){
      this.reset();
      const id = row.id || this.ids
      this.getParkList();
      getWorkshop(id).then(response => {
        this.form = response.data;
        if (this.form.supplyType!==null){
          this.form.supplyType = this.form.supplyType.split(",")
        }
        if (this.form.wshopFireControl !== null ) {
          this.form.wshopFireControl = this.form.wshopFireControl.split(",");
        }
        if (this.form.wshopFloorMaterial !== null) {
          this.form.wshopFloorMaterial = this.form.wshopFloorMaterial.split(",");
        }
        // this.form.wshopGas = this.form.wshopGas.split(",");
        //客梯
        if (response.data.wshopElevatorPeople != null && response.data.wshopElevatorPeople.indexOf("有-") !== -1) {
          this.otherElevatorPeople = response.data.wshopElevatorPeople
          this.otherElevatorPeople = this.otherElevatorPeople.substring(this.otherElevatorPeople.indexOf("有-") + 2)
          this.form.wshopElevatorPeople = this.form.wshopElevatorPeople.substring(0, this.form.wshopElevatorPeople.indexOf("有-") + 2)
        }
        //货梯
        if (response.data.wshopElevatorCargo != null && response.data.wshopElevatorCargo.indexOf("有-") !== -1) {
          this.otherElevatorCargo = response.data.wshopElevatorCargo
          this.otherElevatorCargo = this.otherElevatorCargo.substring(this.otherElevatorCargo.indexOf("有-") + 2)
          this.form.wshopElevatorCargo = this.form.wshopElevatorCargo.substring(0, this.form.wshopElevatorCargo.indexOf("有-") + 2)
        }
        //燃气
        if (response.data.wshopGas != null && response.data.wshopGas.includes("其他-")) {
          this.otherGas = response.data.wshopGas
          this.form.wshopGas = this.form.wshopGas.substring(0, response.data.wshopGas.indexOf("其他-") + 3);
          this.otherGas = this.otherGas.substring(this.otherGas.indexOf("其他-") + 3);
        }
        if (response.data.provinceId != null && response.data.provinceId !== '') {
          listCity(response.data.provinceId).then(rest => {
            this.citys = rest.data;
          })
        }
        this.settingUp = true;
        const old_Form=this.form
        localStorage.setItem('old_Form',JSON.stringify(old_Form));
      });
    },
    /** 审核 */
    spaceAudit(row) {
      this.reset();
      const id = row.id || this.ids
      this.getParkList();
      getWorkshop(id).then(response => {
        this.form = response.data;
        if (this.form.supplyType!==null){
          this.form.supplyType = this.form.supplyType.split(",")
        }
        if (this.form.wshopFireControl !== null ) {
          this.form.wshopFireControl = this.form.wshopFireControl.split(",");
        }
        if (this.form.wshopFloorMaterial !== null) {
          this.form.wshopFloorMaterial = this.form.wshopFloorMaterial.split(",");
        }
        // this.form.wshopGas = this.form.wshopGas.split(",");
        //客梯
        if (response.data.wshopElevatorPeople != null && response.data.wshopElevatorPeople.indexOf("有-") !== -1) {
          this.otherElevatorPeople = response.data.wshopElevatorPeople
          this.otherElevatorPeople = this.otherElevatorPeople.substring(this.otherElevatorPeople.indexOf("有-") + 2)
          this.form.wshopElevatorPeople = this.form.wshopElevatorPeople.substring(0, this.form.wshopElevatorPeople.indexOf("有-") + 2)
        }
        //货梯
        if (response.data.wshopElevatorCargo != null && response.data.wshopElevatorCargo.indexOf("有-") !== -1) {
          this.otherElevatorCargo = response.data.wshopElevatorCargo
          this.otherElevatorCargo = this.otherElevatorCargo.substring(this.otherElevatorCargo.indexOf("有-") + 2)
          this.form.wshopElevatorCargo = this.form.wshopElevatorCargo.substring(0, this.form.wshopElevatorCargo.indexOf("有-") + 2)
        }
        //燃气
        if (response.data.wshopGas != null && response.data.wshopGas.includes("其他-")) {
          this.otherGas = response.data.wshopGas
          this.form.wshopGas = this.form.wshopGas.substring(0, response.data.wshopGas.indexOf("其他-") + 3);
          this.otherGas = this.otherGas.substring(this.otherGas.indexOf("其他-") + 3);
        }
        if (response.data.provinceId != null && response.data.provinceId !== '') {
          listCity(response.data.provinceId).then(rest => {
            this.citys = rest.data;
          })
        }
        // this.open = true;
        this.wshopAudit = true;
        // this.title = "修改厂房";
      });
    },
    /** 提交审核 */
    submitCheck(state) {
      updateWorkshop({
        id: this.form.id,
        approvalState: state,
        approvalNote: this.form.approvalNote,
        recheckNote: this.form.recheckNote
      }).then(response => {
        this.$modal.msgSuccess("审核成功");
        this.wshopAudit = false;
        this.getList();
      });

    },
    //更改发布类型
    updateRelease(releaseType) {
      // console.log(releaseType)
      if (this.form.releaseType === 0) {
        this.form.wshopLeasePrice = null;
        this.form.wshopSellPrice = null;
        this.form.wshopNeedSize = null;
      } else {
        this.form.wshopLeasePrice = null;
        this.form.wshopSellPrice = null;
        this.form.wshopFreeSize = null;
        this.form.wshopAllSize = null;
      }
    },
    /** 提交按钮 */
    submitForm() {
      const old_Form=localStorage.getItem('old_Form')
      const form=JSON.stringify(this.form)
      if(form !== old_Form) {
        this.form.approvalState = 0
      }
      if (this.acreage<0){
        this.$alert('还有未处理的警告，请处理完相关问题后提交', '警告', {
          confirmButtonText: '确定',
          callback: action => {
            this.$message({
              type: 'info',
              message: `处理完相关问题后再提交`
            });
          }
        })
        return
      }
      this.$refs["form"].validate(valid => {
        if (valid) {
          //客梯
          if (this.form.wshopElevatorPeople === "有-"&&(this.otherElevatorPeople==null||this.otherElevatorPeople==='')) {
            this.$modal.msgError("请填写客梯数量");
            return;
          }
          //货梯
          if (this.form.wshopElevatorCargo === "有-"&&(this.otherElevatorCargo==null||this.otherElevatorCargo==='')) {
            this.$modal.msgError("请填写货梯数量");
            return;
          }
          //燃气
          if (this.form.wshopGas === "其他-"&&(this.otherGas==null||this.otherGas==='')) {
            this.$modal.msgError("请输入其他燃气种类");
            return
          }
          this.form.wshopFireControl = this.form.wshopFireControl.join(",");
          this.form.wshopFloorMaterial = this.form.wshopFloorMaterial.join(",");
          this.form.supplyType = this.form.supplyType.join(",");
          // this.form.wshopGas = this.form.wshopGas.join(",");
          //客梯
          if (this.form.wshopElevatorPeople === "有-") {
            this.form.wshopElevatorPeople = this.form.wshopElevatorPeople + this.otherElevatorPeople
          }
          //货梯
          if (this.form.wshopElevatorCargo === "有-") {
            this.form.wshopElevatorCargo = this.form.wshopElevatorCargo + this.otherElevatorCargo
          }
          //燃气
          if (this.form.wshopGas === "其他-") {
            this.form.wshopGas = this.form.wshopGas + this.otherGas
          }
          if (this.form.id != null) {
            updateWorkshop(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addWorkshop(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    submitSet() {
      if (this.acreage<0){
        this.$alert('还有未处理的警告，请处理完相关问题后提交', '警告', {
          confirmButtonText: '确定',
          callback: action => {
            this.$message({
              type: 'info',
              message: `处理完相关问题后再提交`
            });
          }
        })
        return
      }
      this.$refs["form"].validate(valid => {
        if (valid) {
          //客梯
          if (this.form.wshopElevatorPeople === "有-"&&(this.otherElevatorPeople==null||this.otherElevatorPeople==='')) {
            this.$modal.msgError("请填写客梯数量");
            return;
          }
          //货梯
          if (this.form.wshopElevatorCargo === "有-"&&(this.otherElevatorCargo==null||this.otherElevatorCargo==='')) {
            this.$modal.msgError("请填写货梯数量");
            return;
          }
          //燃气
          if (this.form.wshopGas === "其他-"&&(this.otherGas==null||this.otherGas==='')) {
            this.$modal.msgError("请输入其他燃气种类");
            return
          }
          this.form.wshopFireControl = this.form.wshopFireControl.join(",");
          this.form.wshopFloorMaterial = this.form.wshopFloorMaterial.join(",");
          this.form.supplyType = this.form.supplyType.join(",");
          // this.form.wshopGas = this.form.wshopGas.join(",");
          //客梯
          if (this.form.wshopElevatorPeople === "有-") {
            this.form.wshopElevatorPeople = this.form.wshopElevatorPeople + this.otherElevatorPeople
          }
          //货梯
          if (this.form.wshopElevatorCargo === "有-") {
            this.form.wshopElevatorCargo = this.form.wshopElevatorCargo + this.otherElevatorCargo
          }
          //燃气
          if (this.form.wshopGas === "其他-") {
            this.form.wshopGas = this.form.wshopGas + this.otherGas
          }
          updateWorkshop(this.form).then(response => {
            this.$modal.msgSuccess("设置成功");
            this.settingUp = false;
            this.getList();
          });
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除厂房编号为"' + ids + '"的数据项？').then(function () {
        return delWorkshop(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {
      });
    },
    getprovinceList() {
      var parentId = 0;
      listCity(parentId).then(res => {
        // console.log("AAA",res)
        this.provinces = res.data;
      })
    },
    //查询市列表
    getCityList(provinceId) {
      // console.log("BBB",provinceId)
      listCity(provinceId).then(res => {
        this.citys = res.data;
      })
      this.queryParams.cityId = null;
      this.form.cityId = null;
      this.form.areaId = null;
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('industry/workshop/export', {
        ...this.queryParams
      }, `workshop_${new Date().getTime()}.xlsx`)
    },
    handleEntrust(row) {
      getEntrust(row.id).then(res =>{
        const link=document.createElement('a');
        // let blob = new Blob([res.data],{type: 'applicationnd.ms-excel'});    //如果后台返回的不是blob对象类型，先定义成blob对象格式
        let blob =   new Blob([res], { type: 'application/octet-stream' })    //如果后台返回的直接是blob对象类型，直接获取数据
        // let _fileName = res.headers['content-disposition'].split(';')[1].split('=')[1]; //拆解获取文件名，
        link.style.display='none';
        // 兼容不同浏览器的URL对象
        const url = window.URL || window.webkitURL || window.moxURL;
        link.href=url.createObjectURL(blob);
        link.download =`workshop_${new Date().getTime()}.docx`;   //下载的文件名称
        link.click();
        window.URL.revokeObjectURL(url);  //  #URL.revokeObjectURL()方法会释放一个通过URL.createObjectURL()创建的对象URL. 当你要已经用过了这个对象URL,然后要让浏览器知道这个URL已经不再需要指向对应的文件的时候,就需要调用这个方法.
        this.$modal.msgSuccess("修改成功");
      })
    },
    //获取园区id
    getParkList() {
      parkList().then(res => {
        // console.log(res)
        this.parkList = res.data;
      })
    },
    /** 导入按钮操作 */
    handleImport() {
      this.upload.title = "厂房管理导入";
      this.upload.open = true;
    },
    /** 下载模板操作 */
    importTemplate() {
      this.download('industry/workshop/importTemplate', {
      }, `workshop_template_${new Date().getTime()}.xlsx`)
    },
    // 文件上传中处理
    handleFileUploadProgress(event, file, fileList) {
      this.upload.isUploading = true;
    },
    // 文件上传成功处理
    handleFileSuccess(response, file, fileList) {
      this.upload.open = false;
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
      this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
      this.getList();
    },
    // 提交上传文件
    submitFileForm() {
      this.$refs.upload.submit();
    }
  }
};
</script>
<style scoped>

.sq {
  width: 25px;
  margin: 0 10px;
  border: none;
  border-bottom: 1px solid;
}

.workshop {
  width: 90%;
}
</style>
